'use strict';

const Service = require('egg').Service;

class HomeService extends Service {
    async login(username, password) {
        return this.app.mysql.select("userlist", { where: { username, password } })
    }
    async menuList(role_id) {
        return this.app.mysql.query(`select resource_router,resource_name,id from resourcelist where power like '%${role_id}%'`)
    }
}

module.exports = HomeService;